Carbon


GetScriptVariable

Header: Script.h Carbon status: Supported

Retrieves the value of the specified script variable from the specified script system.

SInt32 GetScriptVariable (
    SInt16 script, 
    SInt16 selector
);
Parameter descriptions
script

A value that specifies the script system whose variable you are accessing. Use one of the script-code constants listed in “Script Codes”.

selector

A value that specifies a particular script variable. Use one of the selector constants listed in “Selectors for Script Variables”. Valid selector values are defined by each script system.

function result

0 if the selector value is invalid or if the specified script system is not installed. For some valid selectors, 0 may also be a valid return value. For example, calling GetScriptVariable with a selector of smScriptLang on a version of Macintosh system software that has been localized for the United States returns 0.

Although GetScriptVariable always returns a long integer, the actual value may be a long integer, standard integer, or signed byte. If the value is not a long integer, it is stored in the low-order word or byte of the long integer returned by GetScriptVariable; the remaining bytes are set to 0.

DISCUSSION

Each enabled script system maintains a set of variables that control the current settings of that script system, including the ID numbers of its international resources, its preferred fonts and font sizes, and its primary line direction.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)